#include "Runway.h"

Runway::Runway(DOF::ID id, Ogre::Vector3 pos, Ogre::Quaternion rot, Ogre::String name, Ogre::SceneManager *sceneMgr) : DOF::GameObject(id, pos, rot, name)
{
	m_pSceneMgr = sceneMgr;

	m_pEntity = m_pSceneMgr->createEntity("Runway" + Ogre::StringConverter::toString(id), "Cube.mesh");
	m_pNode = m_pSceneMgr->getRootSceneNode()->createChildSceneNode("RunwayNode" + Ogre::StringConverter::toString(id), pos, rot);
	m_pNode->attachObject(m_pEntity);
}

Runway::~Runway(void)
{
	m_pNode->detachAllObjects();
	m_pSceneMgr->destroyEntity(m_pEntity);
	m_pSceneMgr->destroySceneNode(m_pNode);
}

void Runway::update(const Ogre::FrameEvent &evt)
{

}

void Runway::translate(Ogre::Vector3 newPos)
{
	m_pNode->translate(newPos);
}